<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<IEnumerable<TheWorldsWorst.ApiWrapper.Model.Question>>" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Questions Tagged <%= ViewData["Tag"] %> - TWWSOC</title>
    <link rel="Stylesheet" href="../../Content/all.css" />
</head>
<body>
<div class="container">
    <div id="header">
        <div id="topbar">
        </div>
        <br class="cbt"/>
        <div id="hlogo">
            <a href="/"><img src="../../Content/img/logo.png" alt="The World's Worst StackOverflow Clone"/></a>
        </div>
        <%= StackOverflow.Api.ExampleApp.Views.Shared.Format.Header("questions") %>
    </div>
    <div id="content">
        <div id="mainbar-full">    
            <div id="subheader">
                <h2>Questions Tagged <%= ViewData["Tag"] %></h2>
                <div id="tabs">
                </div>          
            </div>
        </div>

    <div id="questions">
    <%
       foreach (var q in Model)
       {
           Response.Write(StackOverflow.Api.ExampleApp.Views.Shared.Format.QuestionListing(q));
       }
    %>
    </div>    
    <br class="cbt"/>
    <%
        Response.Write(StackOverflow.Api.ExampleApp.Views.Shared.Format.Pager("/tags/" + System.Web.HttpUtility.UrlEncode((String)ViewData["Tag"]), (int)ViewData["PageNum"], (int)ViewData["PageSize"], (((int)ViewData["PageSize"])==Model.Count())));
    %>
    </div>
</div>
</body>
</html>
